<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex flex-direction flex-wrap align-stretch benben-position-layout flex repairCompleted_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center justify-between repairCompleted_fd0_0'>
					<view class='flex flex-wrap align-center repairCompleted_fd0_0_c0' @tap.stop="handleJumpDiy"
						data-type="back" data-url="1">
						<text class='fu-iconfont2  repairCompleted_fd0_0_c0_c0'>&#xE794;</text>
					</view>
					<view class='flex flex-wrap align-center'>
						<text class='repairCompleted_fd0_0_c1_c0'>确认服务完成</text>
					</view>
					<view class='flex align-center justify-end repairCompleted_fd0_0_c0'>
					</view>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<!---flex布局flex布局开始-->
			<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout repairCompleted_flex_1">
				<text class='repairCompleted_fd1_0'>请填写完成信息</text>
				<view class='flex flex-wrap repairCompleted_fd1_1'>
					<textarea class='flex repairCompleted_input_fd1_1' :placeholder="'请您输入需要备注内容'" :maxlength="240"
						placeholder-style="color:rgba(153, 153, 153, 1);font-size:28rpx"
						v-model="weixiuwanchengbeizhu" />

				</view>
				<benben-images-upload ref="benbenImagesUploadfd1_2" :img-list.sync="weixiuwanchengtupianList"
					:img-ids.sync="weixiuwanchengtupian" :maxlength="9">
					<template #content="{ num, maxlength, isShow, imgList }">
						<view class="flex flex-wrap align-start flex">

							<view v-for="(image, index) in imgList" :key="index"
								class='flex position-relative repairCompleted_fd1_20'>
								<text class='fu-iconfont2 position-absolute repairCompleted_fd1_200'
									@tap.stop="$refs.benbenImagesUploadfd1_2.delImage(index)">&#xE8E7;</text>
								<image class='repairCompleted_fd1_201'
									@tap.stop="$refs.benbenImagesUploadfd1_2.previewImage(index)" mode="aspectFill"
									:src='image'></image>
							</view>
							<image class='repairCompleted_fd1_21'
								@tap.stop="$refs.benbenImagesUploadfd1_2.manyChooseImage()" v-if="isShow"
								mode="aspectFit" :src='STATIC_URL+"51.png"'></image>
						</view>
					</template>
				</benben-images-upload>
			</view>

			<!---flex布局flex布局结束-->
			<view class="flex flex-wrap align-start justify-center benben-position-layout flex repairCompleted_flex_2">
				<button class='repairCompleted_fd2_0' @tap.stop="postCompleteFunc()">提交</button>

			</view>
			<view :style="{height: '120rpx'}"></view>


		</view>
	</view>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'

	export default {
		components: {},


		data() {
			return {
				"weixiuwanchengtupian": "",
				"weixiuwanchengtupianList": [],
				"weixiuwanchengbeizhu": "",
				"sn": null
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},
			/**
			 * @returns 
			 * Android       安卓
			 * IOS       苹果
			 * Web       H5 或 pc
			 * Wechat       微信小程序
			 * Alipay       支付宝小程序
			 * Baidu       百度小程序
			 * ByteBounce       抖音小程序
			 * 360       360小程序
			 * FastApp       快应用
			 */
			appSystemIdentification() {
				return this.$store.state.appSystemIdentification
			}
		},
		watch: {},
		onLoad(options) {
			let {
				sn
			} = options
			if (sn !== undefined) this.sn = sn
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//提交服务完成
			async postCompleteFunc() {
				if (this.weixiuwanchengtupianList.length < 1) {
					this.$message.info('请上传服务图片');
					return false;
				}
				//请求方法
				//数据验证

				let data63945c9a175e8 = await this.$api.dbPost(global.apiUrls.post63945c9a175e8, {
					aid: this.sn,
					weixiuwanchengtupian: this.weixiuwanchengtupian,
					weixiuwanchengbeizhu: this.weixiuwanchengbeizhu
				});
				if (!data63945c9a175e8) return
				if (data63945c9a175e8.data.code != 1) {
					this.$message.info(data63945c9a175e8.data.msg);
					return
				}
				this.$urouter.navigateBack(1);
			}
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: rgba(255, 255, 255, 1);
		background-size: 100% auto;
	}

	.repairCompleted_flex_0 {
		border-bottom: 1px solid #eee;
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.repairCompleted_fd0_0_c1_c0 {
		font-size: 36rpx;
		font-weight: 500;
		color: #333333;
	}

	.repairCompleted_fd0_0_c0_c0 {
		font-size: 36rpx;
		color: #333;
		font-weight: 500;
	}

	.repairCompleted_fd0_0_c0 {
		width: 100rpx;
	}

	.repairCompleted_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
		line-height: 88rpx;
	}

	.repairCompleted_flex_1 {
		padding: 32rpx 32rpx 8rpx 32rpx;
	}

	.repairCompleted_fd1_21 {
		width: 160rpx;
		height: 160rpx;
		margin: 0rpx 24rpx 24rpx 0rpx;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
	}

	.repairCompleted_fd1_201 {
		width: 160rpx;
		height: 160rpx;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
	}

	.repairCompleted_fd1_200 {
		top: 0rpx;
		right: 0rpx;
		z-index: 10;
		color: #ff5536;
	}

	.repairCompleted_fd1_20 {
		margin: 0rpx 24rpx 24rpx 0rpx;
	}

	.repairCompleted_input_fd1_1 {
		width: 100%;
		height: 220rpx;
		font-size: 28rpx;
		font-weight: 400;
		color: #333;
		white-space: pre-wrap;
	}

	.repairCompleted_fd1_1 {
		background: rgba(246, 246, 246, 1);
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		padding: 24rpx 24rpx 24rpx 24rpx;
		margin: 0rpx 0rpx 32rpx 0rpx;
	}

	.repairCompleted_fd1_0 {
		color: #333333;
		font-size: 30rpx;
		font-weight: 700;
		margin: 0rpx 0rpx 32rpx 0rpx;
	}

	.repairCompleted_flex_2 {
		width: 750rpx;
		height: 120rpx;
		overflow: hidden;
		z-index: 10;
		bottom: calc(0rpx + var(--window-bottom));
	}

	.repairCompleted_fd2_0 {
		background: rgba(48, 144, 255, 1);
		border-radius: 44rpx 44rpx 44rpx 44rpx;
		font-size: 32rpx;
		color: #fff;
		width: 686rpx;
		height: 88rpx;
		line-height: 88rpx;
	}
</style>